home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form SelectFields
- Caption = "Report Wizard"
- ClientHeight = 4665
- ClientLeft = 60
- ClientTop = 405
- ClientWidth = 6465
- Icon = "SelectFields.frx":0000
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 4665
- ScaleWidth = 6465
- StartUpPosition = 2 'CenterScreen
- Begin VB.CommandButton btnFinish
- Caption = "&Finish"
- Height = 375
- Left = 5160
- TabIndex = 10
- Top = 4200
- Width = 975
- End
- Begin VB.CommandButton btnNext
- Caption = "&Next >"
- Height = 375
- Left = 3975
- TabIndex = 9
- Top = 4185
- Width = 975
- End
- Begin VB.CommandButton btnBack
- Caption = "< &Back"
- Height = 375
- Left = 2985
- TabIndex = 8
- Top = 4200
- Width = 975
- End
- Begin VB.CommandButton btnCancel
- Cancel = -1 'True
- Caption = "Cancel"
- Height = 375
- Left = 1800
- TabIndex = 7
- Top = 4200
- Width = 975
- End
- Begin VB.CommandButton btnRemoveAllFields
- Caption = "<<"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 3000
- TabIndex = 6
- Top = 2880
- Width = 495
- End
- Begin VB.CommandButton btnRemoveField
- Caption = "<"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 3000
- TabIndex = 5
- Top = 2520
- Width = 495
- End
- Begin VB.CommandButton btnGetAllFields
- Caption = ">>"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 2985
- TabIndex = 4
- Top = 1920
- Width = 495
- End
- Begin VB.CommandButton btnGetField
- Caption = ">"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 3000
- TabIndex = 3
- Top = 1560
- Width = 495
- End
- Begin VB.ListBox lstSelectedFields
- Height = 1815
- Left = 3840
- TabIndex = 2
- Top = 1440
- Width = 2535
- End
- Begin VB.ListBox lstAvailable
- Height = 1815
- Left = 120
- TabIndex = 1
- Top = 1440
- Width = 2535
- End
- Begin VB.ComboBox cboTables
- Height = 315
- Left = 120
- TabIndex = 0
- Top = 600
- Width = 2535
- End
- Begin VB.Line Line2
- BorderColor = &H80000003&
- X1 = 120
- X2 = 6360
- Y1 = 3945
- Y2 = 3945
- End
- Begin VB.Line Line1
- BorderColor = &H80000005&
- X1 = 120
- X2 = 6360
- Y1 = 3960
- Y2 = 3960
- End
- Begin VB.Label Label5
- Caption = "Selected Fields:"
- Height = 255
- Left = 3840
- TabIndex = 15
- Top = 1200
- Width = 1695
- End
- Begin VB.Label Label4
- Caption = "Available Fields:"
- Height = 255
- Left = 120
- TabIndex = 14
- Top = 1200
- Width = 1695
- End
- Begin VB.Label Label3
- Caption = "Tables"
- Height = 255
- Left = 120
- TabIndex = 13
- Top = 360
- Width = 1695
- End
- Begin VB.Label Label2
- Caption = "You can choose from more than one table."
- Height = 255
- Left = 2880
- TabIndex = 12
- Top = 480
- Width = 3015
- End
- Begin VB.Label Label1
- Caption = "Which fields do you want on your report?"
- Height = 255
- Left = 2880
- TabIndex = 11
- Top = 120
- Width = 3015
- End
- Attribute VB_Name = "SelectFields"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Private Sub btnBack_Click()
- SelectFields.Unload
- NewReport.Show 1
- End Sub
- Private Sub btnCancel_Click()
- End
- End Sub
- Private Sub btnGetAllFields_Click()
- Dim NumFields As Integer
- ' Move the all available fields to the selected field list.
- For NumFields = 0 To lstAvailable.ListCount - 1
- lstAvailable.ListIndex = NumFields
- lstSelectedFields.AddItem lstAvailable.Text
- SQL.Fields.Add lstAvailable.Text, lstAvailable.Text
- SQL.Fields.Item(SQL.Fields.Count).TableName = cboTables.Text
- Next NumFields
- End Sub
- Private Sub btnGetField_Click()
- ' Move the available field to the selected field list.
- If lstAvailable.ListIndex <> -1 Then
- lstSelectedFields.AddItem lstAvailable.Text
- SQL.Fields.Add lstAvailable.Text, lstAvailable.Text
- SQL.Fields.Item(SQL.Fields.Count).TableName = cboTables.Text
- End If
- End Sub
- Private Sub btnNext_Click()
- SelectFields.Hide
- Grouping.Show 1
- End Sub
- Private Sub btnRemoveAllFields_Click()
- Dim x As Integer
- 'Remove all fields from teh list of selected fields.
- lstSelectedFields.Clear
- For x = 1 To SQL.Fields.Count
- SQL.Fields.Remove 1
- Next x
- End Sub
- Private Sub btnRemoveField_Click()
- ' Remove the field from the list of selected fields.
- If lstSelectedFields.ListIndex <> -1 Then
- SQL.Fields.Remove lstSelectedFields.ListIndex + 1
- lstSelectedFields.RemoveItem lstSelectedFields.ListIndex
- End If
- End Sub
- Private Sub cboTables_Click()
- ' Fill in the available list any time the table name changes.
- lstAvailable.Clear
- Call GetColumns(lstAvailable, cboTables.Text)
- End Sub
- Private Sub Form_Load()
-
- ' Fill in the combo with list of tables.
- Call GetTables(cboTables)
- ' Select the table that was chosen on the first dialog
- cboTables.Text = NewReport.cboTables.Text
- ' Fill in the available columns listbox.
- lstAvailable.Clear
- Call GetColumns(lstAvailable, cboTables.Text)
- End Sub
- Private Sub lstAvailable_DblClick()
- ' Move the available field to the selected field list.
- If lstAvailable.ListIndex <> -1 Then
- lstSelectedFields.AddItem lstAvailable.Text
- SQL.Fields.Add lstAvailable.Text, lstAvailable.Text
- SQL.Fields.Item(SQL.Fields.Count).TableName = cboTables.Text
- End If
- End Sub
- Private Sub lstSelectedFields_DblClick()
- ' Remove the field from the list of selected fields.
- If lstSelectedFields.ListIndex <> -1 Then
- SQL.Fields.Remove lstSelectedFields.Text
- lstSelectedFields.RemoveItem lstSelectedFields.ListIndex
- End If
- End Sub
-